<style tyle="text/css">
    .modal-lg {
      width: 60%;
    }
</style>
<div class="modal-header">
  <h4 class="modal-title">拼团活动产品信息</h4>
</div>
<div class="modal-body">
  <form name="form" class="form-horizontal">
    <div class="form-group" ng-if="formdata.statue == 'new'">
      <div class="col-lg-5 col-lg-offset-3">
        <ui-select ng-model="formdata.item" theme="bootstrap">
          <ui-select-match placeholder="请选择产品.">{{$select.selected.name}}</ui-select-match>
          <ui-select-choices repeat="item in saleList | filter: $select.search">
            <span ng-bind-html="item.name | highlight: $select.search"></span>
            <span ng-show="item.code">({{item.code}})</span>
          </ui-select-choices>
         </ui-select>
      </div>
       <div class="col-lg-2">
         <button class="btn btn-success" ng-click="ok()">确 认</button>
       </div>
    </div>
    <div class="form-group">
      <label class="col-lg-4 control-label">产品信息</label>
      <label class="col-lg-6 control-label text-left">
        <b ng-show="formdata.sale_name">{{formdata.sale_name}}({{formdata.sale_code}})</b>
        <b ng-show="!formdata.sale_name">无</b>
      </label>
    </div>
    <div class="form-group">
      <label class="col-lg-4 control-label">原价格</label>
      <label class="col-lg-6 control-label text-left">
        <strong style="color: red;">{{formdata.market_price | currency : '￥'}}</strong>
      </label>
    </div>
    <div class="form-group">
      <label class="col-lg-4 control-label">活动开始时间</label>
      <div class="col-lg-3">
        <div class="input-group" ng-click="dateOpen($event, date)">
          <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="date.lable" 
          is-open="date.opened" placeholder="开始时间" ng-required="true" close-text="关闭" 
          current-text="今天" clear-text="清除" readonly/>
          <span class="input-group-btn">
            <button type="button" class="btn btn-default">
              <i class="glyphicon glyphicon-calendar"></i>
            </button>
          </span>
        </div>
      </div>
      <div class="col-lg-2">
        <input ui-jq="TouchSpin" ng-model="formdata.hour1" type="number" class="form-control" data-min='0' data-max="23" data-postfix="时"
        data-verticalbuttons="true" data-verticalupclass="fa fa-caret-up" data-verticaldownclass="fa fa-caret-down">
      </div>
      <div class="col-lg-2">
        <input ui-jq="TouchSpin" ng-model="formdata.minute1" type="number" class="form-control" data-min='0' data-max="59" data-postfix="分"
        data-verticalbuttons="true" data-verticalupclass="fa fa-caret-up" data-verticaldownclass="fa fa-caret-down">
      </div>
    </div>
    <div class="form-group">
      <label class="col-lg-4 control-label">活动结束时间</label>
      <div class="col-lg-3">
        <div class="input-group" ng-click="dateOpen($event, date1)">
          <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="date1.lable" 
          is-open="date1.opened" placeholder="结束时间" ng-required="true" close-text="关闭" 
          current-text="今天" clear-text="清除" readonly/>
          <span class="input-group-btn">
            <button type="button" class="btn btn-default">
              <i class="glyphicon glyphicon-calendar"></i>
            </button>
          </span>
        </div>
      </div>
      <div class="col-lg-2">
        <input ui-jq="TouchSpin" ng-model="formdata.hour2" type="number" class="form-control" data-min='0' data-max="23" data-postfix="时"
        data-verticalbuttons="true" data-verticalupclass="fa fa-caret-up"  data-verticaldownclass="fa fa-caret-down">
      </div>
      <div class="col-lg-2">
        <input ui-jq="TouchSpin" ng-model="formdata.minute2" type="number" class="form-control" data-min='0' data-max="59" data-postfix="分"
        data-verticalbuttons="true" data-verticalupclass="fa fa-caret-up"  data-verticaldownclass="fa fa-caret-down">
      </div>
    </div>
    <div class="form-group">
      <div class="col-lg-8 col-lg-offset-2">
        <table class="table table-bordered">
          <thead>
            <th class="text-center" style="width: 130px">序号</th>
            <th class="text-center" style="width: 130px">阶段人数</th>
            <th class="text-center" style="width: 130px">阶段价格</th>
            <th class="text-center" style="width: 100px">操作 
              <span class="text-success" ng-click="add()" style="font-size: 16px;">
                <i class="fa fa-plus-circle"></i>
              </span>
            </th>
          </thead>
          <tbody>
            <tr ng-repeat="item in formdata.stage_list">
              <td class="text-center" style="vertical-align: middle">{{$index + 1}}</td>
              <td class="text-center">
                <input type="number" class="form-control" ng-model="item.end_num">
              </td>
              <td class="text-center">
                <div class="input-group">
                  <input type="number" class="form-control" ng-model="item.price">
                  <span class="input-group-addon">元</span>
                </div>
              </td>
              <td class="text-center">
                <button class="btn btn-rounded btn-sm btn-icon btn-danger" ng-click="remove($index)">
                  <i class="fa fa-times"></i>
                </button>
              </td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  </form>
</div>
  
<div class="modal-footer">
  <button class="btn btn-success" type="button" ng-click="save()">确定</button>
  <button class="btn btn-danger" type="button" ng-click="cancel()">取消</button>
</div>
  